package common.utils;

import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author yyh
 *
 * @date 2017/6/7
 *
 * @description 字符串处理工具
 */
public class MyStringUtils extends StringUtils{

    public static List<Long> StringToList(String str , String regex){
        List<Long> list = new ArrayList<>();
        String[] idArray = str.split(regex);
        for (String id:idArray){
            if (!StringUtils.isEmpty(id)){
                list.add(Long.valueOf(id));
            }
        }
        return list;
    }
}
